Thread: 2^1000 result too large!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    May 2008
    Location
    Australia
    Posts
    230

    2^1000 result too large!

    So I've got a challenge to get the result of 2^1000, then add each digit of that result together. The only problem is, the maximum size integer you can use in C++ is a 64 bit integer, which can store a maximum value of 2^64. So, to be honest, I have NO idea how this is going to be possible (But there HAS to be a way, 100% guaranteed)... I'd like some hints towards a solution if possible (that is if anyone knows ;o). So yeah, some hints would be nice! Thanks

    P.s I'm sure a few of you know where this challenge is coming from
    Last edited by pobri19; 09-28-2008 at 08:29 AM.
    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Large scale crawler with C/C++???
    By joshskender in forum C++ Programming
    Replies: 12
    Last Post: 10-12-2006, 05:13 AM
  2. parse truly large numbers to binary
    By alch in forum C Programming
    Replies: 3
    Last Post: 07-20-2006, 01:39 PM
  3. Large String Comparisions...
    By alvifarooq in forum C++ Programming
    Replies: 10
    Last Post: 05-30-2005, 03:54 AM
  4. Computing Large Values
    By swbluto in forum C++ Programming
    Replies: 8
    Last Post: 04-07-2005, 03:04 AM
  5. Return Statement
    By Daveo in forum C Programming
    Replies: 21
    Last Post: 11-09-2004, 05:14 AM